//
//  ZYXStudyDetCell.m
//  RuiBeiKang
//
//  Created by iOS开发1 on 2019/1/11.
//  Copyright © 2019年 JW. All rights reserved.
//

#import "ZYXStudyDetCell.h"

@implementation ZYXStudyDetCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setModel:(ZYXStudyInfoModel *)model{
    _model = model;
    self.contentLabel.text = model.content;
//    if ([model.userName isEqualToString:@"管理员"]) {
//        self.nameLabel.textColor = [UIColor colorWithHexString:@"#1cca62"];
//    }else{
//        self.nameLabel.textColor = [UIColor colorWithHexString:@"#c15871"];
//    }
    ///图片地址
    [self.iconImgView sd_setImageWithURL:[NSURL URLWithString:kImgAllUrl(model.avatar)] placeholderImage:IMG(@"imgLoading")];
    self.timeLabel.text = model.time;
    self.nameLabel.text = model.nickname;
    if ([model.res isEqualToString:@"1"]) {
        self.commmentBtn.hidden = NO;
        self.commentBtnHeight.constant = 25;
    }else{
        self.commmentBtn.hidden = YES;
        self.commentBtnHeight.constant = 0;
    }
}
- (IBAction)clickHuiFuBtn:(UIButton *)sender {
    [self.delegate clickHuiFu:self.indexPath];
}

@end
